import App from './App'
import shopxPub from '@/utils/pub.js';
import shopxHttp from '@/utils/http.js';
import shopxSys from '@/utils/shopx.js';
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import { EventBus } from './utils/eventBus'
Vue.config.productionTip = false
App.mpType = 'app'

// 挂载 http 到 Vue 实例
Vue.prototype.$shopxHttp = shopxHttp;

// 挂载到Vue原型
Vue.prototype.$bus = EventBus

const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	// app.config.globalProperties.$serverPath = 'https://wygw.wuyin298.com/';
	// app.config.globalProperties.$ossPath = 'https://jxoss.yunqz.cn/oss/';
	// app.config.globalProperties.$ossPath2 = 'https://jxoss.yunqz.cn/oss';
	app.config.globalProperties.$serverPath = 'http://127.0.0.1:9003/';
	app.config.globalProperties.$ossPath = 'http://127.0.0.1:9002/oss/';
	app.config.globalProperties.$ossPath2 = 'http://127.0.0.1:9002/oss';
	app.config.globalProperties.$shopxPub = shopxPub;
	app.config.globalProperties.$shopxHttp = shopxHttp;
	app.config.globalProperties.$shopxSys = shopxSys;
	return {
		app
	}
}
// #endif